
#ifndef  FRAME_NETFRAMEIMPLFACTORY_H
#define  FRAME_NETFRAMEIMPLFACTORY_H

#include <memory>

namespace frame {

class ServiceImpl;
class ClientImpl;
class ConnectHandlerImpl;

class ImplFactory {
public:
    typedef std::shared_ptr<ImplFactory> Ptr;

    virtual ~ImplFactory(){}
    virtual std::shared_ptr<ServiceImpl> createService() = 0;
    virtual std::shared_ptr<ClientImpl> createClient(std::shared_ptr<ServiceImpl> serviceImpl, std::shared_ptr<ConnectHandlerImpl> connectHandler) = 0;
};


enum NetFrameImplType{
    MOCK,
    ASIO,
    EASY,
};

class NetFrameImplFactory {
public:
    static NetFrameImplFactory &instance();
    ImplFactory::Ptr create(NetFrameImplType impType);
    ~NetFrameImplFactory(){}
private:
    NetFrameImplFactory(){}
};

} //end of namespace frame

#endif   /* FRAME_NETFRAMEIMPLFACTORY_H */
